/*
 * @Author: Xia_cc 978487464@qq.com
 * @Date: 2022-08-16 20:01:32
 * @LastEditors: Xia_cc 978487464@qq.com
 * @LastEditTime: 2022-08-17 16:48:11
 * @FilePath: \bpm-management-system\src\component\examinemanage\Myfrom.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: jjjjwei 1506865174@qq.com
 * @Date: 2022-08-15 21:37:54
 * @LastEditors: Xia_cc 978487464@qq.com
 * @LastEditTime: 2022-08-17 16:47:22
 * @FilePath: \bpm-management-system\src\component\examinemanage\wofaqideshenpi\Myfrom.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react'
import { Button, Form, Input, Select,DatePicker } from 'antd';
export default function Myfrom(propos) {
  const { Option } = Select;
  const search = (values) => {
    if(values.paydate instanceof Object){values.paydate=values.paydate.format('YYYY-MM-DD')}
    if(values.tijiaoshijian instanceof Object){values.tijiaoshijian=values.tijiaoshijian.format('YYYY-MM-DD HH:mm')}
    const value = {...values,paydate:values.paydate,tijiaoshijian:values.tijiaoshijian}
    propos.getdata(value)
  };
const [form] = Form.useForm();
  return (
    <>
        <Form
            name="time_related_controls"
            form={form}
                labelCol={{
                    span: 8,
                }}
                wrapperCol={{
                    span: 16,
                }}
                initialValues={{
                    remember: true,
                }}
                autoComplete="off"
                onFinish={search}
            >
                <Form.Item label="标题" name="title" labelCol={{
                    span: 9,
                }}>
                    <Input placeholder="请输入" />
                </Form.Item>
                <Form.Item label={propos.label} name="paydate" labelCol={{
                    span: 9,
                }}>
                    <DatePicker placeholder="请选择"/>
                </Form.Item>
                <Form.Item label="项目名称" name="projectname" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                {propos.contract==='true'&&
                <Form.Item label="关联合同" name="hetong" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                }
                <Form.Item label="是否紧急" name="jinji" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                <Form.Item label="申请人" name="shenqingren" labelCol={{
                    span: 9,
                }}>
                    <Input placeholder="请输入" />
                </Form.Item>
                <Form.Item label="提交时间" name="tijiaoshijian" labelCol={{
                    span: 9,
                }}>
                    <DatePicker showTime format="YYYY-MM-DD HH:mm" placeholder="请选择"/>
                </Form.Item>
                {propos.state==='true'&&
                <Form.Item label="状态" name="state" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                }
                {propos.state!=='true' &&
                <Form.Item label="审核状态" name="shenhezhuangtai" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                }
                {propos.dispose==='true' && 
                <Form.Item label="处理状态" name="chulizhuangtai" labelCol={{
                    span: 9,
                }}>
                    <Select placeholder="请选择">
                        <Option value="china">China</Option>
                        <Option value="usa">U.S.A</Option>
                    </Select>
                </Form.Item>
                }
                {propos.dispose!=='true' &&
                <Form.Item labelCol={{
                    span: 9,
                    offset: 30,
                }}>
                </Form.Item>
                }
                {propos.contract!=='true'&&
                <Form.Item labelCol={{
                    span: 9,
                }}>
                </Form.Item>
                }
                <Form.Item>
                <Button className='search' htmlType="submit">查询</Button>
                <Button className='reset' onClick={() => {form.resetFields()}}>重置</Button>
                </Form.Item>
            </Form>
    </>
  )
}
